/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package miscelanea.tiposgenericos;

import java.util.Set;
import java.util.TreeSet;

/**
 *
 * @author Thony
 */
public class PruebaComparable {
    public static void main(String[] args)
    {
       Set <Persona> lista = new TreeSet<Persona>();
       lista.add(new Persona("Juan",12));
       lista.add(new Persona("Alberto",14));
       lista.add(new Persona("Ivan",15));
       lista.add(new Persona("Angel",24));

       System.out.println(lista);
    }
}
